package Message.Public
{
    import Engine.RMI.*;
    import Framework.Serialize.*;

    public class EPetSireOperation extends Object
    {
        public var __value:int;
        private static var __values:Array = [];
        public static const _EPetSireOperApply:int = 1;
        public static const EPetSireOperApply:EPetSireOperation = new EPetSireOperation(_EPetSireOperApply);
        public static const _EPetSireOperAgree:int = 2;
        public static const EPetSireOperAgree:EPetSireOperation = new EPetSireOperation(_EPetSireOperAgree);
        public static const _EPetSireOperUpdatePet:int = 3;
        public static const EPetSireOperUpdatePet:EPetSireOperation = new EPetSireOperation(_EPetSireOperUpdatePet);
        public static const _EPetSireOperLock:int = 4;
        public static const EPetSireOperLock:EPetSireOperation = new EPetSireOperation(_EPetSireOperLock);
        public static const _EPetSireOperConfirm:int = 5;
        public static const EPetSireOperConfirm:EPetSireOperation = new EPetSireOperation(_EPetSireOperConfirm);
        public static const _EPetSireOperCancel:int = 6;
        public static const EPetSireOperCancel:EPetSireOperation = new EPetSireOperation(_EPetSireOperCancel);
        public static const _EPetSireOperError:int = 7;
        public static const EPetSireOperError:EPetSireOperation = new EPetSireOperation(_EPetSireOperError);
        public static const _EPetSireOperSire:int = 8;
        public static const EPetSireOperSire:EPetSireOperation = new EPetSireOperation(_EPetSireOperSire);
        public static const _EPetSireOperUnSire:int = 9;
        public static const EPetSireOperUnSire:EPetSireOperation = new EPetSireOperation(_EPetSireOperUnSire);
        public static const _EPetSireOperEnd:int = 10;
        public static const EPetSireOperEnd:EPetSireOperation = new EPetSireOperation(_EPetSireOperEnd);

        public function EPetSireOperation(param1:int)
        {
            this.__value = param1;
            __values[param1] = this;
            
        }

        public function value() : int
        {
            return this.__value;
        }

        public function equals(param1:Object) : Boolean
        {
            if (param1 == this)
            {
                return true;
            }
            var _loc_2:* = param1 as ERMICallModel;
            if (_loc_2 == null)
            {
                return false;
            }
            return this.__value == _loc_2.value();
        }

        public function hashCode() : int
        {
            return 5 * this.__value;
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeByte(this.__value);
            
        }

        public static function convert(param1:int) : EPetSireOperation
        {
            return __values[param1];
        }

        public static function __read(param1:SerializeStream) : EPetSireOperation
        {
            var _loc_2:* = param1.readByte();
            if (_loc_2 < 0 || _loc_2 >= 11)
            {
                throw new MarshalException();
            }
            return EPetSireOperation.convert(_loc_2);
        }

    }
}
